package com.goudan.ojcloudserviceclient.FeignClient;

import com.goudan.ojcloudserviceclient.fallback.QuestionFallBack;
import com.goudan.ojmodel.entity.Question;
import com.goudan.ojmodel.entity.QuestionSubmit;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;

/**
* 题目接口
*/
@FeignClient(name = "oj-cloud-question-service",path = "/api/question/inner",fallback = QuestionFallBack.class)
public interface QuestionFeignClient  {
    @GetMapping("/get/id")
    Question getById(@RequestParam("questionId") Long questionId);
    @GetMapping("/question_submit/get/id")
    QuestionSubmit getQuestionSubmit(@RequestParam("questionSubmitId") Long questionSubmitId);
    @PostMapping("/question_submit/update")
    boolean updateQuestionSubmitById(@RequestBody QuestionSubmit questionSubmit);
}
